home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / pdox693.zip / TI584.ASC < prev    next >
Text File  |  1992-12-08  |  5KB  |  199 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Paradox                                NUMBER  :  584
  9.   VERSION  :  All
  10.        OS  :  DOS
  11.      DATE  :  December 8, 1992                         PAGE  :  1/3
  12.  
  13.     TITLE  :  Copying records using SETKEY
  14.  
  15.  
  16.  
  17.  
  18.                   Description of the CPYNPST script
  19.  
  20.   Frequently in Paradox, when editing or coediting records, the
  21.   need may arise to make a copy of a complete record in a table.
  22.   While Paradox does provide a Ditto key <Ctrl - D>, the range of
  23.   this key is limited to copying a single field.
  24.  
  25.   This example script uses the PAL SETKEY command, in conjunction
  26.   with the COPYTOARRAY, and COPYFROMARRAY commands, to provide the
  27.   function of copying a complete record in a table.
  28.  
  29.  
  30.                      Creating the CPYNPST script
  31.  
  32.   From the Paradox Main Menu select:
  33.  
  34.      1.  Scripts
  35.  
  36.      2.  Editor
  37.  
  38.      3.  New (For versions earlier than 4.0, select Write)
  39.  
  40.      4.  At the 'Script:' prompt, type in:  CPYNPST  <ENTER>
  41.  
  42.      5.  Type the following text into the script editor as two
  43.          single lines: (Due to printer output constraints, the text
  44.          of each single line is printed on two separate lines.  In
  45.          the first example, the line which begins with the 'record"
  46.          sleep 2000' should be appended in your editor to the end
  47.          of the previous line.)
  48.  
  49.          Line one of text:
  50.  
  51.          SETKEY -46 copytoarray clip message "Copying current
  52.          record" sleep 2000; <Alt - C>
  53.  
  54.          Line two of text:
  55.  
  56.          SETKEY -25 ins copyfromarray clip message "Pasting stored
  57.          record" sleep 2000; <Alt - P>
  58.  
  59.      6.  Press F2 to save the script file CPYNPST.SC
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Paradox                                NUMBER  :  584
  75.   VERSION  :  All
  76.        OS  :  DOS
  77.      DATE  :  December 8, 1992                         PAGE  :  2/3
  78.  
  79.     TITLE  :  Copying records using SETKEY
  80.  
  81.  
  82.  
  83.  
  84.   The first SETKEY macro sets a hotkey for the keycode "-46", which
  85.   is the representation for <Alt - C>.  The second SETKEY macro
  86.   sets a hotkey for the keycode "-25", which is the representation
  87.   for the <Alt - P>.  For a list of other keys or combinations of
  88.   keys that can be used, refer to Appendix G of the PAL Reference
  89.   Guide (for versions earlier than 4.0, refer to the Appendix B of
  90.   the PAL User's Guide).  The "sleep 2000" statement causes a 2
  91.   second delay (2000 milliseconds) and is used in the examples in
  92.   this Technical Information sheet to pause the message on the
  93.   screen.
  94.  
  95.  
  96.                        Using the CPYNPST Script
  97.  
  98.   To initialize the <Alt - C> and <Alt - P> keys for Cutting and
  99.   Pasting, select from the Paradox Main menu:
  100.  
  101.      1.  Scripts
  102.  
  103.      2.  Play
  104.  
  105.      3.  At the 'Script:' prompt type in:  CPYNPST <ENTER>
  106.  
  107.   Once the script has been played, the <Alt - C> key will store the
  108.   record at current cursor position.  The <Alt - P> key will insert
  109.   a new blank record and paste a copy of the stored record.
  110.  
  111.                     Additional examples/variations
  112.  
  113.   To physically move a record, to cut and paste a record, the above
  114.   example setkeys could be modified as follows:
  115.  
  116.   SETKEY -46 copytoarray clip del message "Cutting current record"
  117.   sleep 2000; <Alt - C>
  118.  
  119.   SETKEY -25 ins copyfromarray clip message "Pasting stored record"
  120.   sleep 2000; <Alt - P>
  121.  
  122.   Below is an example SETKEY definition which will ditto the
  123.   previous record into the current record position:
  124.  
  125.   SETKEY -32 up copytoarray x down ins copyfromarray x message
  126.   "Copying record"  sleep 2000; <Alt - D>
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.   PRODUCT  :  Paradox                                NUMBER  :  584
  141.   VERSION  :  All
  142.        OS  :  DOS
  143.      DATE  :  December 8, 1992                         PAGE  :  3/3
  144.  
  145.     TITLE  :  Copying records using SETKEY
  146.  
  147.  
  148.  
  149.  
  150.   (Again in your script, each SETKEY definition must be entered on
  151.   a single line.)  For additional information about the SETKEY
  152.   command, refer to the Chapter 20 of the PAL Programmer's Guide
  153.   (for versions earlier than 4.0, refer to Chapter 16 of the PAL
  154.   User's Guide).
  155.  
  156.   If you wish to have the setkeys loaded automatically when you
  157.   start Paradox, you can place the lines of PAL SETKEY code into an
  158.   INIT script that is located in your private directory.  If you
  159.   are not using a private directory, then the INIT script should be
  160.   in the directory where Paradox was installed, for example,
  161.   PDOX40.  The INIT script is a Paradox program that runs
  162.   automatically when Paradox is started like an Autoexec.bat file
  163.   runs automatically when a computer is booted.  For additional
  164.   information on INIT scripts, refer to the the PAL Programmer's
  165.   Guide (for versions earlier than 4.0, refer to the PAL User's
  166.   Guide).
  167.  
  168.   DISCLAIMER: You have the right to use this technical information
  169.   subject to the terms of the No-Nonsense License Statement that
  170.   you received with the Borland product to which this information
  171.   pertains.
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.